package org.prism.reflection.bean;

public class Apple{
    private Integer id;
    String name;
    public double price;

    public void sell(String name){
        System.out.println("一款apple设备被" + name + "出售！！");
    }

    public void buy(String name){
        System.out.println("一款apple设备被" + name + "抢到！！");
    }


    @Override
    public String toString() {
        return "Apple{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", price=" + price +
                '}';
    }

    public Apple() {
    }

    private Apple(String name) {
        this.name = name;
    }

    public Apple(Integer id, String name, double price) {
        this.id = id;
        this.name = name;
        this.price = price;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }
}
